<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>文章列表--layui后台管理模板 2.0</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
<style type="text/css">
.thumbBox{ overflow:hidden; border:1px solid #e6e6e6; border-radius:2px; cursor:pointer; position:relative; text-align:center; line-height:153px;}
.thumbImg{ max-width:100%; max-height:100%; border:none;}
.thumbBox:after{ position:absolute; width:100%; height:100%;line-height:153px; z-index:-1; text-align:center; font-size:20px; content:"上传车辆图片"; left:0; top:0; color:#9F9F9F;}
</style>
</head>
<body style="margin: 20px;">
	<form class="layui-form layui-row layui-col-space10"
		style="width: 800px;">
			<div class="layui-row layui-col-space10">
				<div class="layui-col-md8 layui-col-xs7">
					<div class="layui-form-item">
						<label class="layui-form-label">车牌号</label>
						<div class="layui-input-block">
							<input type="text" id="carnumber" name="carnumber" class="layui-input" lay-verify="required"
								placeholder="请输入车牌号">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">车辆类型</label>
						<div class="layui-input-block">
							<input type="text" name="cartype" class="layui-input" placeholder="请输入车辆类型">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">车辆颜色</label>
						<div class="layui-input-block ">
							<input type="text" name="color" class="layui-input" placeholder="请输入车辆颜色">
						</div>
					</div>
				</div>
				<div class="layui-col-md4 layui-col-xs5">
					<div class="layui-upload-list thumbBox">
						<img class="layui-upload-img thumbImg">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">车辆价格</label>
					<div class="layui-input-inline">
						<input type="number" name="price"  class="layui-input" placeholder="请输入车辆价格">
					</div>
				</div>
				<label class="layui-form-label">出租价格</label>
				<div class="layui-input-inline">
					<input type="number" name="rentprice"  class="layui-input" placeholder="请输入出租价格">
				</div>

			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">出租押金</label>
					<div class="layui-input-inline">
						<input type="number" name="deposit" class="layui-input" placeholder="请输入出租押金">
					</div>
					<label class="layui-form-label">出租状态</label>
					<div class="layui-input-inline">
						<input type="radio" name="isrenting" value="0" title="在库" checked="checked"> 
						<input type="radio" name="isrenting" value="1" title="出租中">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">车辆描述</label>
					<div class="layui-input-block">
						<textarea name="description" class="layui-textarea" placeholder="请输入车辆描述"></textarea>
					</div>
				</div>
			</div>
			<div class="layui-form-item" style="margin: 10px; text-align: center;">
				<div class="layui-input-block">
					<button type="button"
						class="layui-btn layui-icon layui-icon-release" lay-submit=""
						lay-filter="doSubmit">保存</button>
					<button type="reset" id="dataFrmResetBtn"
						class="layui-btn layui-btn-warm layui-icon layui-icon-refresh">重置</button>
				</div>
			</div>
	</form>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use([ 'form', 'layer', 'upload' ], function() {
			var form = layui.form
			layer = layui.layer, laypage = layui.laypage,
					upload = layui.upload, $ = layui.jquery;

			//上传缩略图
			upload.render({
				elem : '.thumbBox',
				url : '../../json/userface.json',
				method : "get", //此处是为了演示之用，实际使用中请将此删除，默认用post方式提交
				done : function(res, index, upload) {
					var num = parseInt(4 * Math.random()); //生成0-4的随机数，随机显示一个头像信息
					$('.thumbImg').attr('src', res.data[num].src);
					$('.thumbBox').css("background", "#fff");
				}
			});

		})
	</script>
</body>
</html>